package com.example.paydemo.controller;


import com.example.paydemo.model.Product;
import com.example.paydemo.service.ProductService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "商品管理")
@RestController
@RequestMapping("/api/product")
public class ProductController {
    @Autowired
    private ProductService productService;

    @GetMapping("/list")
    public List<Product> list(){
        List<Product> list = productService.list();
<<<<<<< master1
        System.out.println("完成模块二的开发" + "完成模块二的开发");
        System.out.println("优化了模块二的开发" + "优化了模块二的开发");
        return list;
    }
}